<?php
namespace addons\member\models;
use system\Model;

class Member extends Model{
	protected $salt = 'member';
	// 平台
	const Platform = [
		1 => '普通' ,
		2 => '微信' ,
		3 => '小程序'
	];
	// 状态
	const State = [
		0 => '禁用' ,
		1 => '正常' ,
	];
	// 性别
	const Gender = [
		0 => '未知' ,
		1 => '男' ,
		2 => '女' ,
	];

	/**
	 * 生成密码
	 * @param $username
	 * @param $password
	 * @return string
	 * @author Colin <amcolin@126.com>
	 * @date 2022-01-26 上午10:59
	 */
	public function genderPassword($username , $password){
		return sha1($this->salt . $username . $password);
	}
}